//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - upper
// 1 - lower
//===================================================================================

namespace App.Domain.Handlers {
    using System;
    using App.Data;
    using App.Domain.Contracts;
    using App.Model;

    public class GetApplication {
        private readonly IApplicationRepository _applicationRepository;

        public GetApplication(IApplicationRepository applicationRepository) {
            _applicationRepository = applicationRepository;
        }

        public Application Execute(Guid applicationId) {
            try {
                return _applicationRepository.GetApplication(applicationId);
            }
            catch (InvalidOperationException ex) {
                throw new BusinessServicesException("UnableToRetrieveReminderExceptionMessage", ex);
            }
        }
    }
}
